﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class ePioneer_ep_question_answer_check : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            CMSModel.CMSEntities dal = DAL.DBManager.GetCmsEmtity();
            var alist = dal.ePioneer_Answer.OrderByDescending(x => x.CreateDate);
            Repeater1.DataSource = alist;
            Repeater1.DataBind();
        }
    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        int iChecked = Convert.ToInt32(this.ddl_IsCheck.SelectedValue);

        CMSModel.CMSEntities dal = DAL.DBManager.GetCmsEmtity();
        var alist = dal.ePioneer_Answer.Where(x => x.IsCheck == iChecked).OrderByDescending(x => x.CreateDate);
        Repeater1.DataSource = alist;
        Repeater1.DataBind();
    }
}